package com.pizza.gui;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.util.ArrayList;

import javax.swing.BoxLayout;
import javax.swing.JPanel;
import javax.swing.border.Border;
import javax.swing.plaf.BorderUIResource;

import com.pizza.adapter.AdapterListPizzeria;
import com.pizza.adapter.ZamowienieRow;
import com.pizza.spring.rmi.Produkt;

public class ZamowieniePanel extends JPanel implements KeyListener{
	ArrayList<Produkt> produkty;
	ArrayList<ZamowienieRow> zamowienieRows;
	public ZamowieniePanel(PizzeriaGui pizzeriaGui,ArrayList<Produkt> produkty) {//panel 
		super();
		setVisible(true);
		setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

		this.produkty = produkty;
		this.add(new AdapterListPizzeria(pizzeriaGui,WIDTH, HEIGHT, produkty));
	}

	@Override
	public void keyPressed(KeyEvent e) {
	if(e.getKeyCode()==KeyEvent.VK_ESCAPE)
		this.setVisible(false);
		//costam na true
		
	}

	@Override
	public void keyReleased(KeyEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void keyTyped(KeyEvent e) {
		// TODO Auto-generated method stub
		
	}
	
}
